﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Proxies;
using System.Text;

namespace LX.Core.Aop.Aspects
{
    public class ExceptionAspectAttribute : ProxyAttribute
    {
        public override MarshalByRefObject CreateInstance(Type serverType)
        {
            var mobj = base.CreateInstance(serverType);
            RealProxy realProxy = new ExceptionAspect(serverType, mobj);
            return realProxy.GetTransparentProxy() as MarshalByRefObject;
            
        }
    }
}
